@import "utils";

html, body {
  height: 100%;
  margin: 0px;
  padding: 0px;
  overflow: auto;
  /*
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  */
}

.page {
  -webkit-overflow-scrolling: touch;
}

* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input {
  -webkit-user-select: auto;
}

textarea {
  -webkit-user-select: auto;
}


#app > div {
  &.page, &.van-pull-refresh {
    min-height: 100% !important;
    height: auto;
  }
}

.page-loading {
  &.van-toast--default {
    width: 100px;
    height: 100px;
    min-height: auto;
  }

  &.is-message {
    width: 150px;
    min-height: 150px;

    .van-toast__text {
      text-align: center;
    }
  }
}

.skeleton {
  max-height: 100% !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.skeleton-transparent {
  *, img {
    opacity: 0 !important;
    background-color: transparent !important;
    color: transparent !important;
    background-image: none !important;
  }
}

.tabbar {
  box-shadow: 0px -1px 0px 0px #f5f5f5;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 98px;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  li {
    flex: 1;
    text-align: center;
    $iconMap: (
      cart:53px 48px,
      category:48px 48px,
      home:48px 48px,
      self:48px 48px,
    );

    i {
      display: block;
      margin: 0 auto;
      width: 53px;
      height: 48px;
      background: {
        repeat: no-repeat;
        position: center center;
      }
    }

    @each $key, $value in $iconMap {
      &.tabbar-#{$key} {
        i {
          background: {
            image: url('../img/i_tabbar_#{$key}.png');
            size: #{$value};
          }
        }
      }
    }

    &.is-selected {
      p {
        color: #fb4f54;
      }

      @each $key, $value in $iconMap {
        &.tabbar-#{$key} {
          i {
            background: {
              image: url('../img/i_tabbar_#{$key}_selected.png');
            }
          }
        }
      }
    }

  }

  p {
    //padding-top: 8px;
    font-size: 22px;
    color: #999999;
  }
}

.page-tabbar {
  padding-bottom: ($tabbar-height)+2px;
}

.page-header {
  padding-top: $headH;
}

[v-cloak] {
  display: none;
}

.skeleton-opacity {
  opacity: 0 !important;
}

.visibility-hidden {
  visibility: hidden;
  pointer-events: none;
}
